# -*- coding:utf-8 -*-
import os

basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    SECRET_KEY = 'LookCheng'
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://look:look123@localhost/gaoxiao'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    FLASK_ADMIN = os.environ.get('FLASKY_ADMIN')
    CSRF_ENABLED = True

    @staticmethod
    def init_app(app):
        pass


class DevelopmentConfig(Config):
    DEBUG = True
    MAIL_SERVER = 'localhost'
    MAIL_PORT = 25
    MAIL_USERNAME = None
    MAIL_PASSWORD = None
    MAIL_USE_TLS = False
    MAIL_USE_SSL = False


class TestingConfig(Config):
    pass


class ProductionConfig(Config):
    pass


config = {
    'development': DevelopmentConfig,
    'testing': TestingConfig,
    'production': ProductionConfig,

    'default': DevelopmentConfig
}

# mail server settings
MAIL_SERVER = 'localhost'
MAIL_PORT = 25
MAIL_USERNAME = None
MAIL_PASSWORD = None

# administrator list
ADMINS = ['chaoran7@126.com']
#
'''
MAIL_SERVER localhost  电子邮件服务器的主机名或IP地址 
MAIL_PORT       25      电子邮件服务器的端口  
MAIL_USE_TLS    False    启用传输层安全(Transport Layer Security,TLS)协议
MAIL_USE_SSL      False     启用安全套接层(Secure Sockets Layer,SSL)协议
MAIL_USERNAME      None          邮件账户的用户名
MAIL_PASSWORD      None      邮件账户的密码



'''
#